package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PurchaseInfoMapper;
import com.ruoyi.system.domain.PurchaseInfo;
import com.ruoyi.system.service.IPurchaseInfoService;

/**
 * 购入成本管理Service业务层处理
 * 
 * @author fxk
 * @date 2023-06-21
 */
@Service
public class PurchaseInfoServiceImpl implements IPurchaseInfoService 
{
    @Autowired
    private PurchaseInfoMapper purchaseInfoMapper;

    /**
     * 查询购入成本管理
     * 
     * @param purchaseId 购入成本管理主键
     * @return 购入成本管理
     */
    @Override
    public PurchaseInfo selectPurchaseInfoByPurchaseId(Long purchaseId)
    {
        return purchaseInfoMapper.selectPurchaseInfoByPurchaseId(purchaseId);
    }

    /**
     * 查询购入成本管理列表
     * 
     * @param purchaseInfo 购入成本管理
     * @return 购入成本管理
     */
    @Override
    public List<PurchaseInfo> selectPurchaseInfoList(PurchaseInfo purchaseInfo)
    {
        return purchaseInfoMapper.selectPurchaseInfoList(purchaseInfo);
    }

    /**
     * 新增购入成本管理
     * 
     * @param purchaseInfo 购入成本管理
     * @return 结果
     */
    @Override
    public int insertPurchaseInfo(PurchaseInfo purchaseInfo)
    {
        return purchaseInfoMapper.insertPurchaseInfo(purchaseInfo);
    }

    /**
     * 修改购入成本管理
     * 
     * @param purchaseInfo 购入成本管理
     * @return 结果
     */
    @Override
    public int updatePurchaseInfo(PurchaseInfo purchaseInfo)
    {
        return purchaseInfoMapper.updatePurchaseInfo(purchaseInfo);
    }

    /**
     * 批量删除购入成本管理
     * 
     * @param purchaseIds 需要删除的购入成本管理主键
     * @return 结果
     */
    @Override
    public int deletePurchaseInfoByPurchaseIds(Long[] purchaseIds)
    {
        return purchaseInfoMapper.deletePurchaseInfoByPurchaseIds(purchaseIds);
    }

    /**
     * 删除购入成本管理信息
     * 
     * @param purchaseId 购入成本管理主键
     * @return 结果
     */
    @Override
    public int deletePurchaseInfoByPurchaseId(Long purchaseId)
    {
        return purchaseInfoMapper.deletePurchaseInfoByPurchaseId(purchaseId);
    }
}
